package de.hsowl.tod4a.server.sqlite;

import java.io.IOException;
import java.util.List;

import org.jdom.Document;
import org.jdom.JDOMException;

import android.database.Cursor;

import de.hsowl.tod4a.global.exception.NotSupportedException;
import de.hsowl.tod4a.global.exception.ObjectDatabaseException;
import de.hsowl.tod4a.global.model.ObjectMap;
import de.hsowl.tod4a.server.ObjectManager;

public class SQLiteORM implements ObjectManager {

	private SQLDatabase db;

	public SQLiteORM() {
		db = new SQLDatabase(null, "TEST", 1, null);
	}

	public boolean store(String xmlMessage) throws ObjectDatabaseException {
		return false;
	}

	public boolean store(List<ObjectMap> list) {
		return storeObjects2(list);
	}

	public boolean storeObjects(List<ObjectMap> list) {
		return storeObjects2(list);
	}

	public boolean storeObjects2(List<ObjectMap> list) {
		// TODO Auto-generated method stub
		return false;
	}

	public void remove(String xmlMessage) {
		// TODO Auto-generated method stub

	}

	public void addUser(String xmlMessage) throws Exception {
		throw new NotSupportedException();
	}

	public void addUser(String name, String password) throws IOException, JDOMException {
		throw new NotSupportedException();
	}

	public boolean getUser(Document doc, String name) {
		throw new NotSupportedException();
	}

	public boolean checkLoginCredentials(String name, String password) throws JDOMException, IOException {
		throw new NotSupportedException();
	}

	public String getByClass(String clazzXml) throws Exception {

		return null;
	}

	public List<ObjectMap> getByClazz(String clazz, int depth) throws Exception {
		Cursor cur = db.select("SELECT * FROM " + clazz + " WHERE 0=0");
		return null;
	}

	public List<ObjectMap> getByName(String name, String className, int depth) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public List<ObjectMap> getByName(String name, int depth) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public void removeUser(String xmlMessage) throws JDOMException, IOException {
		throw new NotSupportedException();
	}

	public boolean removeUser_(String username) throws JDOMException, IOException {
		throw new NotSupportedException();
	}

	public void begin() throws ObjectDatabaseException {
		throw new NotSupportedException();
	}

	public void stop() {
		throw new NotSupportedException();
	}

	public void rollback(int num) throws ObjectDatabaseException {
		throw new NotSupportedException();
	}

}
